package org.chen.spring.cloud.finchley.config;

import org.chen.spring.cloud.finchley.interceptor.FeignRequestInterceptor;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 核心配置
 * @author chensj
 * @date 2020-02-07 17:03
 */
@Configuration
public class CoreAutoConfig {
    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    @Bean
    public FeignRequestInterceptor charlesRequestInterceptor() {
        return new FeignRequestInterceptor();
    }
}
